home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / KarbonCurveFit.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-11-13  |  1.6 KB  |  49 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2001-2003 Rob Buis <buis@kde.org>
  3.    Copyright (C) 2007 Jan Hambrecht <jaham@gmx.net>
  4.    Modified for use within Scribus:
  5.    Copyright (C) 2007 Franz Schmid <Franz.Schmid@altmuehlnet.de>
  6.  
  7.    This library is free software; you can redistribute it and/or
  8.    modify it under the terms of the GNU Library General Public
  9.    License as published by the Free Software Foundation; either
  10.    version 2 of the License, or (at your option) any later version.
  11.  
  12.    This library is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.    Library General Public License for more details.
  16.  
  17.    You should have received a copy of the GNU Library General Public License
  18.    along with this library; see the file COPYING.LIB.  If not, write to
  19.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  20.  * Boston, MA 02110-1301, USA.
  21. */
  22.  
  23. #ifndef KARBONCURVEFIT_H
  24. #define KARBONCURVEFIT_H
  25.  
  26. #include <QList>
  27. #include <QPointF>
  28. #include <QPainterPath>
  29.  
  30. /*
  31.  * Fits bezier curve to given list of points.
  32.  *
  33.  * An Algorithm for Automatically Fitting Digitized Curves
  34.  * by Philip J. Schneider
  35.  * from "Graphics Gems", Academic Press, 1990
  36.  *
  37.  * http://www.acm.org/pubs/tog/GraphicsGems/gems/FitCurves.c
  38.  * http://www.acm.org/pubs/tog/GraphicsGems/gems/README
  39.  *
  40.  * @param points the list of points to fit curve to
  41.  * @param error the max. fitting error
  42.  * @return a path shape representing the fitted curve
  43.  */
  44.  
  45. QPainterPath bezierFit( const QList<QPointF> &points, float error );
  46.  
  47. #endif
  48.  
  49.